package com.app.designpatternslearn.behavior.commandpattern.code

class OrderManager {

    private val orders = mutableListOf<Order>()

    fun addOrder(order: Order) = orders.add(order)

    fun dealOrders() {
        for (item in orders) {
            item.execute()
        }
    }
}